CXX = g++

INC = -I./inc -I$(ROOTSYS)/include
SRC = ./src
OBJ = ./obj
OBJS = $(OBJ)/Global.o $(OBJ)/TELFile.o $(OBJ)/TELAlign.o $(OBJ)/TELTrack.o

ROOTLIBS = `root-config --libs` -lMinuit 
RUDELIBS = -L/usr/local/lib/ -lrudeconfig

LIBS = $(ROOTLIBS) $(RUDELIBS)

all: $(OBJS) ./TELAna.cxx
	$(CXX) -ggdb $(INC) $^ $(LIBS) -o tel

$(OBJ)/%.o: $(SRC)/%.cxx
	$(CXX) -ggdb $(INC) -c $< -o $@

